package SmartHome.devices;

import SmartHome.observers.Subject;
import SmartHome.states.DeviceState;
import SmartHome.states.OffState;
import SmartHome.states.OnState;
import SmartHome.strategys.DeviceStrategy;

public class Curtain extends SmartDevice {
    public Curtain() {
        super();
    }

    public Curtain(DeviceState state, DeviceStrategy strategy) {
        super(state, strategy);
    }

    @Override
    public void turnOn() {
        System.out.println("窗帘打开");
        setState(new OnState());
    }

    @Override
    public void turnOff() {
        System.out.println("窗帘关闭");
        setState(new OffState());
    }

    @Override
    public void powerOn() {
        System.out.println("窗帘电源开启");
    }

    @Override
    public void update(Subject subject, String message) {
        System.out.println("窗帘状态更新：" + message);
    }


}
